package com.vegetable.modules.mapper.outbound;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.vegetable.modules.entity.outbound.SalesOut;
import com.vegetable.modules.entity.outbound.po.SalesOutQueryPO;
import com.vegetable.modules.entity.outbound.po.SalesOutStatisticsPO;
import com.vegetable.modules.entity.outbound.vo.SalesOutDetailVO;
import com.vegetable.modules.entity.outbound.vo.SalesOutStatisticsVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 销售出库单 Mapper 接口
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-01
 */
@Mapper
public interface SalesOutMapper extends BaseMapper<SalesOut> {

    /**
     * 生成流水单号
     * @return
     */
    String getNextCode();

    IPage<SalesOutDetailVO>  s1(IPage page, SalesOutStatisticsPO po);

    List<SalesOutStatisticsVO> s2(List<Long> detailIds);

    List<SalesOutDetailVO> selectDetailList(IPage page, SalesOutStatisticsPO po);

    List<Map<String, Object>> analysisSalesOut(Date startTime, Date endTime);

    IPage<SalesOut>  selectOrderListContainSalesMan(IPage page, SalesOutQueryPO po);
}
